package zhoug.demo.zui.ui;

import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.Switch;
import android.widget.Toast;

import zhoug.zui.input.ZUIInputTextView;
import zhoug.demo.zui.R;

import androidx.annotation.Nullable;

/**
 * @Author: zhoug
 * @Date: 2024-07-08
 * @Description:
 */
public class ZUIInputTextViewActivity extends ZUIInputViewBaseActivity {

    private Switch switchEnable;
    private Switch switchError;
    private ZUIInputTextView inputEditTextView11;
    private ZUIInputTextView inputEditTextView13;
    private ZUIInputTextView inputEditTextView14;
    private ZUIInputTextView inputEditTextView15;
    private ZUIInputTextView inputEditTextView21;
    private ZUIInputTextView inputEditTextView23;
    private ZUIInputTextView inputEditTextView24;
    private ZUIInputTextView inputEditTextView25;
    private LinearLayout contentView;

    @Override
    protected void onCreated(@Nullable Bundle savedInstanceState) {
        setContentView(R.layout.activity_input_text_view);
        findViews();
        inputEditTextView11.setOnRightIconClickListener((inputView, icon) -> {
            Toast.makeText(this, "点击图标", Toast.LENGTH_SHORT).show();
        });
    }


    @Override
    protected ViewGroup getContentView() {
        return contentView;
    }

    @Override
    protected Switch getEnableSwitchView() {
        return switchEnable;
    }

    @Override
    protected Switch getErrorSwitchView() {
        return switchError;
    }


    private void findViews() {
        switchEnable = findViewById(R.id.switch_enable);
        switchError = findViewById(R.id.switch_error);
        inputEditTextView11 = findViewById(R.id.inputEditTextView11);
        inputEditTextView13 = findViewById(R.id.inputEditTextView13);
        inputEditTextView14 = findViewById(R.id.inputEditTextView14);
        inputEditTextView15 = findViewById(R.id.inputEditTextView15);
        inputEditTextView21 = findViewById(R.id.inputEditTextView21);
        inputEditTextView23 = findViewById(R.id.inputEditTextView23);
        inputEditTextView24 = findViewById(R.id.inputEditTextView24);
        inputEditTextView25 = findViewById(R.id.inputEditTextView25);
        contentView = findViewById(R.id.contentView);
    }
}
